import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/view/Index'
import Case from '@/view/Case'
import Team from '@/view/Team'
import Bidding from '@/view/Bidding'
import AboutUs from '@/view/AboutUs'
import Playlet from '@/view/Playlet'
import Register from '@/view/Register'
import Login from '@/view/Login'
import UserCenter from '@/view/userCenter/UserCenter'
import UserCenterMenu from '@/view/userCenter/UserCenterMenu'
import EntrustedCase from '@/view/userCenter/EntrustedCase'
import CaseDetail from '@/view/userCenter/CaseDetail'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/case',
      name: 'Case',
      component: Case
    },
    {
      path: '/team',
      name: 'Team',
      component: Team
    },
    {
      path: '/bidding',
      name: 'Bidding',
      component: Bidding
    },
    {
      path: '/aboutUs',
      name: 'AboutUs',
      component: AboutUs
    },
    {
      path: '/playlet',
      name: 'Playlet',
      component: Playlet
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/userCenter',
      name: 'UserCenter',
      component: UserCenter,
      children: [
        {
          path: '',
          component: UserCenterMenu
        },
        {
          path: 'entrustedCase',
          component: EntrustedCase
        },
        {
          path: 'caseDetail',
          component: CaseDetail
        }
      ]
    }
  ]
})
